package br.edu.fanor.esfinge.business.impl;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.EJB;
import javax.ejb.Stateless;

import br.edu.fanor.esfinge.business.ResumoSession;
import br.edu.fanor.esfinge.dao.ResumoDAO;
import br.edu.fanor.esfinge.entity.Resumo;

@Stateless(mappedName="ejb/resumoSession")
public class ResumoSessionImpl implements ResumoSession{

	@EJB
	public ResumoDAO resumoDAO;
	
	@PostConstruct
	public void postConstruct() {
		System.out.println("Criou o EJB");
	}
		
	@PreDestroy
	public void preDestroy(){
		System.out.println("Destruiu o EJB");
	}

	@Override
	public void inserir(Resumo resumo) {
		resumoDAO.inserir(resumo);
		
	}
}
